package com.silence.gankio.util;

import android.app.Activity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class MUtils {
    public static void fitStatusBar(Activity activity){

        Window window = activity.getWindow();
        WindowManager.LayoutParams attributes = window.getAttributes();
        attributes.flags=attributes.flags|WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
        View decorView = window.getDecorView();
        decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN|View.SYSTEM_UI_FLAG_FULLSCREEN);
    }

}
